package com.open.exam.service;
import com.open.exam.common.CommonFunction;
import com.open.exam.common.OperationResult;
import com.open.exam.databasemodel.*;
import com.open.exam.dto.*;
import com.open.exam.enums.*;
import com.open.exam.mapper.*;
import com.open.exam.utils.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;

import java.util.*;

/**
 * @author 奶茶
 * Created on 2017/11/15.
 */
@Service("examMonitorService")
@Transactional(rollbackFor = RuntimeException.class)
public class ExamMonitorService {


    @Autowired
    private ExamMoniterMapper examMoniterMapper;

    /**
     * 查询当前已开考未交卷的考生监控信息
     * @return
     */
    public List<ExamingMonitor> findAllUNSubmitPaperInfo(){
        return examMoniterMapper.findAllUNSubmitPaperInfo();
    }

    /**
     * 修改考生提交试卷状态
     * @param monitor
     * @return
     */
    public Integer updateExamingMonitorSubmitANDSysState(ExamingMonitor monitor){
        return examMoniterMapper.updateExamingMonitorSubmitANDSysState(monitor);
    }

}
